home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmGGGGVVVVeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- _X_m_G_e_t_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a - A function that provides access
- to secondary widget resource data
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <Xm/Xm.h>
-
- Cardinal XmGetSecondaryResourceData (wwwwiiiiddddggggeeeetttt____ccccllllaaaassssssss,,,, sssseeeeccccoooonnnnddddaaaarrrryyyy____ddddaaaattttaaaa____rrrreeeettttuuuurrrrnnnn)
- _W_i_d_g_e_t_C_l_a_s_s wwwwiiiiddddggggeeeetttt____ccccllllaaaassssssss;
- _X_m_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a**sssseeeeccccoooonnnnddddaaaarrrryyyy____ddddaaaattttaaaa____rrrreeeettttuuuurrrrnnnn;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Some Motif widget classes (such as Gadget, Text, and
- VendorShell) have resources that are not accessible via the
- functions _X_t_G_e_t_R_e_s_o_u_r_c_e_L_i_s_t and _X_t_G_e_t_C_o_n_s_t_r_a_i_n_t_R_e_s_o_u_r_c_e_L_i_s_t.
- In order to retrieve the descriptions of these resources, an
- application must use _X_m_G_e_t_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a.
-
- When a widget class has such resources, this function
- provides descriptions of the resources in one or more data
- structures. _X_m_G_e_t_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a takes a widget class
- argument and returns the number of these data structures
- associated with the widget class. If the return value is
- greater than 0, the function allocates and fills an array of
- pointers to the corresponding data structures. It returns
- this array at the address that is the value of the
- sssseeeeccccoooonnnnddddaaaarrrryyyy____ddddaaaattttaaaa____rrrreeeettttuuuurrrrnnnn argument.
-
- The type _X_m_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a is a pointer to a structure
- with two members that are useful to an application:
- rrrreeeessssoooouuuurrrrcccceeeessss, of type _X_t_R_e_s_o_u_r_c_e_L_i_s_t, and nnnnuuuummmm____rrrreeeessssoooouuuurrrrcccceeeessss, of
- type _C_a_r_d_i_n_a_l. The rrrreeeessssoooouuuurrrrcccceeeessss member is a list of the widget
- resources that are not accessible using Xt functions. The
- nnnnuuuummmm____rrrreeeessssoooouuuurrrrcccceeeessss member is the length of the rrrreeeessssoooouuuurrrrcccceeeessss list.
-
- If the return value is greater than 0,
- _X_m_G_e_t_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a allocates memory that the
- application must free. Use _X_t_F_r_e_e to free the resource list
- in each structure (the value of the rrrreeeessssoooouuuurrrrcccceeeessss member), the
- structures themselves, and the array of pointers to the
- structures (the array whose address is
- sssseeeeccccoooonnnnddddaaaarrrryyyy____ddddaaaattttaaaa____rrrreeeettttuuuurrrrnnnn).
-
- wwwwiiiiddddggggeeeetttt____ccccllllaaaassssssss
- Specifies the widget class for which secondary resource
- data is to be retrieved.
-
- sssseeeeccccoooonnnnddddaaaarrrryyyy____ddddaaaattttaaaa____rrrreeeettttuuuurrrrnnnn
- Specifies a pointer to an array of
- _X_m_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a pointers to be returned by this
- function. If the widget class has no secondary
- resource data (i.e., if the value returned by the
-
-
-
- Page 1 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmGGGGVVVVeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((3333XXXX))))
-
-
-
- function is 0), the function returns no meaningful
- value for this argument.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- Returns the number of secondary resource data structures
- associated with this widget class.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEE
- The following example uses _X_m_G_e_t_S_e_c_o_n_d_a_r_y_R_e_s_o_u_r_c_e_D_a_t_a to
- print the names of the secondary resources of the Motif Text
- widget and then frees the data allocated by the function:
- XmSecondaryResourceData * block_array ; Cardinal num_blocks,
- i, j ; if (num_blocks = XmGetSecondaryResourceData
- (xmTextWidgetClass,
- &block_array))
- {
- for (i = 0; i < num_blocks; i++) {
- for (j = 0 ; j < block_array[i]->num_resources; j++) {
- printf("%s\n", block_array[i]-
- >resources[j].resource_name);
- }
- XtFree((char*)block_array[i]->resources);
- XtFree((char*)block_array[i]);
- }
- XtFree((char*)block_array); }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 (printed 11/11/03)
-
-
-
-